@include("user.head")
<div class="wrapper shang-kong" style="margin-top:20px;">
	<div class="col-xs-12 no_padding_both">
		<ol class="breadcrumb">
	      <li><a href="<%url('')%>">碳银网首页</a></li>
	      <li><a href="<%url('industry')%>">低碳产业</a></li>
	      <li class="active">低碳项目</li>
	    </ol>
	</div>
</div>
<div class="wrapper">
	<div class="col-xs-9 no_padding_both">
		<div class="baobei">
			<span class="fl">所有分类></span>
			<span class="fl cate_node">
				@if (isset($firstLevel))
				<?php
					$path = "";
					if(count(Input::all())){
						$path = "?";
						foreach(Input::all() as $key => $value){
							if($key != "aid"){
								$path .= $key . "=" . $value . "&";
							}
						}
					}
				?>
				<a href="<%$path%>"><%$firstLevel%> <i class="fa fa-times"></i></a>
				@endif
			</span>
			<span class="fl cate_node">
				@if (isset($secondLevel))
				<?php
					$path = "";
					if(count(Input::all())){
						$path = "?";
						foreach(Input::all() as $key => $value){
							if($key != "cid"){
								$path .= $key . "=" . $value . "&";
							}
						}
					}
				?>
				<a href="<%$path%>"><%$secondLevel%> <i class="fa fa-times"></i></a>
				@endif
			</span>
			<span class="fl cate_node">
				@if (isset($thirdLevel))
				<?php
					$path = "";
					if(count(Input::all())){
						$path = "?";
						foreach(Input::all() as $key => $value){
							if($key != "tid"){
								$path .= $key . "=" . $value . "&";
							}
						}
					}
				?>
				<a href="<%$path%>"><%$thirdLevel%> <i class="fa fa-times"></i></a>
				@endif
			</span>
			<span class="fr">共<%$count%>个项目</span>
		</div>
		<div class="cp-pp-box col-xs-12 no_padding_both">
			<div class="col-xs-12 no_padding_both cate_margin">
				<div class="cate_label text-right">领 域:</div>
				<?php $i = 0; ?>
				@foreach ($domains as $domain)
					@if($i < 5)
					<span class="cpbj"><a href="<%url('industry/project')%>?<%$curQuery%>aid=<%$domains[$i]['id']%>" area-id="<%$domains[$i]['id']%>"><%$domains[$i]["cate_name"]%></a></span>
					<?php $i++; ?>
					@endif
				@endforeach
				@if ($i < count($domains) - 1)
					<span class="gd fr">更多</span>
				@endif
			</div>
			<div class="col-xs-12 no_padding_right child_row">
				@foreach ($domains as $domain)
					@if(isset($domains[$i]))
					<span class="cpbj"><a href="<%url('industry/project')%>?<%$curQuery%>aid=<%$domains[$i]['id']%>" area-id="<%$domains[$i]['id']%>"><%$domains[$i]["cate_name"]%></a></span>
					<?php $i++; ?>
					@endif
				@endforeach
			</div>
			<div class="col-xs-12 no_padding_both cate_margin">
				<?php $i = 0; ?>
				@if (count($domains) > 0)
					<div class="cate_label text-right">子分类:</div>
					@foreach ($domains as $domain)
						@if (isset($domain["children"]) && count($domain["children"]))
							@foreach ($domain["children"] as $d)
								@if ($i < 5)
								<span class="cpbj"><a href="<%url('industry/project')%>?<%$curQuery%>cid=<%$d['id']%>" child-id="<%$d['id']%>"><%$d["cate_name"]%></a></span>
								<?php $i++; ?>
								@endif
							@endforeach
							@if ($i < count($domain["children"]) - 1)
								<span class="gd fr">更多</span>
							@endif
						@endif
					@endforeach
				@endif
			</div>
			<div class="col-xs-12 no_padding_both cate_margin">
				<div class="cate_label text-right">技 术:</div>
				<?php $i = 0; ?>
				@foreach ($techs as $tech)
					@if($i < 5)
					<span class="cpbj"><a href="<%url('industry/project')%>?<%$curQuery%>tid=<%$techs[$i]['id']%>" tech-id="<%$techs[$i]['id']%>"><%$techs[$i]["cate_name"]%></a></span>
					<?php $i++; ?>
					@endif
				@endforeach
				@if ($i < count($techs) - 1)
					<span class="gd fr">更多</span>
				@endif
			</div>
			<div class="col-xs-12 no_padding_right child_row">
				@foreach ($techs as $tech)
					@if(isset($techs[$i]))
					<span class="cpbj"><a href="<%url('industry/project')%>?<%$curQuery%>tid=<%$techs[$i]['id']%>" tech-id="<%$techs[$i]['id']%>"><%$techs[$i]["cate_name"]%></a></span>
					<?php $i++; ?>
					@endif
				@endforeach
			</div>
		</div>
		<div class="col-xs-12 no_padding_both">
			<nav class="navbar navbar-default">
		      <div class="container-fluid no_padding_both">
		        <div class="collapse navbar-collapse no_padding_both" id="bs-example-navbar-collapse-6">
		          <ul class="nav navbar-nav no_padding_both">
		            <li class="active"><a href="javascript:void(0)">综合排序</a></li>
		          </ul>
		        </div>
		      </div>
		    </nav>
		</div>
		<div class="col-xs-12 no_padding_both dataList">
			@foreach ($projects as $project)
			<a href="project/detail?pid=<%$project['id']%>">
				<div class="col-xs-12 no_padding_both">
					<div class="panel panel-default">
						<div class="panel-body">
							<div class="col-xs-2 no_padding_left">
								<span style="display:block;width:100px;height:100px;background:url(<%url('images')%>/<%$project["uid"]%>/project/<%$project["image"]%>) center center no-repeat;background-size:100% 100%;"></span>
							</div>
							<div class="col-xs-5 no_padding_left">
								<div class="col-xs-12 no_padding_both">
									<h4><%mb_substr($project["name"], 0, 12)%></h4>
								</div>
								<div class="col-xs-12 no_padding_both">
									计划启动时间: <%format($project["start_time"], "Y-m-d")%>
								</div>
								<div class="col-xs-12 no_padding_both">
									计划完成时间: <%format($project["end_time"], "Y-m-d")%>
								</div>
								<div class="col-xs-12 no_padding_both" style="padding-top:5px;">
									@if ($project["is_financing"])
										@if ($project["state"] == 0)
											<span class="label label-danger pull_left">正在招标中</span>
										@elseif($project["state"] == 1)
											<span class="label label-warning pull_left">已确认执行方</span>
										@elseif($project["state"] == 2)
											<span class="label label-success pull_left">正在进行中</span>
										@elseif($project["state"] == 3)
											<span class="label label-primary pull_left">项目已完成</span>
										@endif
									@else
										<span class="label label-default pull_left">项目未资产化</span>
									@endif
								</div>
							</div>
							<div class="col-xs-5 no_padding_both">
								<div class="col-xs-12 no_padding_both">
									<div class="col-xs-3 no_padding_both text-right">
										用能单位:
									</div>
									<div class="col-xs-9">
										<%$project["userData"]["company_name"]%>
									</div>
								</div>
								<div class="col-xs-12 no_padding_both">
									<div class="col-xs-3 no_padding_both text-right">
										项目模式:
									</div>
									<div class="col-xs-9">
										<%$project["investment_type"]["name"]%>
									</div>
								</div>
								<div class="col-xs-12 no_padding_both">
									<div class="col-xs-3 no_padding_both text-right">
										项目类型:
									</div>
									<div class="col-xs-9">
										@if (count($project["project_domain"]))
										<%$project["project_domain"][0]["domain"]["parent"]["cate_name"]%> <%$project["project_domain"][0]["domain"]["cate_name"]%>
										@endif
									</div>
								</div>
								<div class="col-xs-12 no_padding_both">
									<div class="col-xs-3 no_padding_both text-right">
										所在地:
									</div>
									<div class="col-xs-9">
										<%$project["province"]["area_name"]%> @if ($project["province"]["area_name"] != $project["city"]["area_name"]) <%$project["city"]["area_name"]%> @endif <%$project["area"]["area_name"]%>
									</div>
								</div>
								<div class="col-xs-12 no_padding_both">
									<div class="col-xs-3 no_padding_both text-right">
										应用主体:
									</div>
									<div class="col-xs-9">
										@if (isset($model["main_body"]))
											@foreach ($model["main_body"] as $main)
												<span class="label label-default" style="line-height:inherit;"><%$main["main_body"]["name"]%></span>
											@endforeach
										@endif
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</a>
			@endforeach
			<div class="col-xs-12 text-center">
				<?php echo $presenter->render(); ?>
			</div>
		</div>
	</div>
	<div class="col-xs-3 no_padding_right rec_project_list dataList">
		<div class="panel panel-default">
		  <div class="panel-heading">
		    <h3 class="panel-title">推荐项目</h3>
		  </div>
		  <div class="panel-body">
		  	@foreach ($recommand as $project)
		  	<div class="col-xs-12 rec_project thumbnail">
		  		<a href="project/detail?pid=<%$project['id']%>">
			  		<span style="display:block;width:100%;height:200px;background:url(<%url('images')%>/<%$project["uid"]%>/project/<%$project["image"]%>) center center no-repeat;background-size:100% 100%;"></span>
			  		<span class="col-xs-12">
			  			<h5><%$project["name"]%></h5>
			  		</span>
			  		<span class="col-xs-12 product_des">
						<%mb_substr($project["description"], 0, 30)%>
					</span>
				</a>
		  	</div>
		  	@endforeach
		  </div>
		</div>
	</div>
</div>
<div class="wrapper">
	<ul class="nav nav-tabs">
	  <li class="active"><a href="#home" data-toggle="tab" aria-expanded="true"><span class="lb-1">热门项目</span></a></li>
	  <li class=""><a href="#profile" data-toggle="tab" aria-expanded="false"><span class="lb-2">热门设备</span></a></li>
	  <li class=""><a href="#tech" data-toggle="tab" aria-expanded="false"><span class="lb-3">热门技术</span></a></li>
	  <span class="sxbj fr"><a href="">我也要出现在这里</a></span>
	</ul>
	<div id="bottomRecommand" class="tab-content dataList">
	  <div class="tab-pane fade active in" id="home">
	   		@foreach ($bottomProject as $project)
		  	<div class="col-xs-2">
		  		<div class="col-xs-12 thumbnail">
		  			<a href="project/detail?pid=<%$project['id']%>">
				  		<img src="<%url('images')%>/<%$project["uid"]%>/project/<%$project["image"]%>" width="100%" alt="" />
				  		<span class="col-xs-12">
				  			<h5><%$project["name"]%></h5>
				  		</span>
				  		<span class="col-xs-12 product_des">
							<%mb_substr($project["description"], 0, 10)%>
						</span>
					</a>
			  	</div>
		  	</div>
		  	@endforeach
	  </div>
	  <div class="tab-pane fade dataList" id="profile">
	    	@foreach ($bottomDevice as $device)
		  	<div class="col-xs-2">
		  		<div class="col-xs-12 thumbnail">
		  			<a href="device/detail?did=<%$device['id']%>">
				  		<img src="<%url('images')%>/<%$device["uid"]%>/device/<%$device["image"]%>" width="100%" alt="" />
				  		<span class="col-xs-12">
				  			<h5><%$device["name"]%></h5>
				  		</span>
				  		<span class="col-xs-12 product_des">
							<%mb_substr($device["description"], 0, 10)%>
						</span>
					</a>
			  	</div>
		  	</div>
		  	@endforeach
	  </div>
	  <div class="tab-pane fade dataList" id="tech">
	    	@foreach ($bottomTech as $tech)
		  	<div class="col-xs-2">
		  		<div class="col-xs-12 thumbnail">
		  			<a href="tech/detail?tid=<%$tech['id']%>">
				  		<img src="<%url('images')%>/<%$tech["uid"]%>/tech/<%$tech["image"]%>" width="100%" alt="" />
				  		<span class="col-xs-12">
				  			<h5><%$tech["tech_name"]%></h5>
				  		</span>
				  		<span class="col-xs-12 product_des">
							<%mb_substr($tech["description"], 0, 10)%>
						</span>
					</a>
			  	</div>
		  	</div>
		  	@endforeach
	  </div>
	</div>
</div>
@include("user.footer")
@include("user.common")
<script type="text/javascript">
	$(".gd").click(function(){
		var x = $(this).parent().next().css("display");console.log(x)
		if (x == "none")
		{
			$(this).parent().next().css("display","block");
			$(this).parent().css("border-bottom","none");
			$(this).html("收起");
			x = "block"
		}
		else
		{
			$(this).parent().next().css("display","none");
			$(this).parent().css("border-bottom","1px dashed #E8E8E8");
			$(this).html("更多");
		}
	});
</script>
</html>